﻿@using System.Globalization
@using Abp.Timing
@using PithyDesign.Web.Views.Shared.Components.LanguageSelection
@using PithyDesign.Web.Views.Shared.Components.TopMenu
@using Abp.Web.Security.AntiForgery
@inject IAbpAntiForgeryManager AbpAntiForgeryManager
@using Abp.Web.Mvc.Alerts
@inject IAlertManager AlertManager
@{
    AbpAntiForgeryManager.SetCookie(Context);
}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <link rel="shortcut icon" href="~/favicon.ico">
    <title>PithyDesign</title>

    <!-- Global styles -->
    <environment names="Development">
        <link rel="stylesheet" href="~/lib/toastr/toastr.css" />
        <link rel="stylesheet" href="~/lib/sweetalert/dist/sweetalert.css" />
        <link rel="stylesheet" href="~/lib/famfamfam-flags/dist/sprite/famfamfam-flags.css" />
        <link rel="stylesheet" href="~/lib/font-awesome/css/font-awesome.css" />
    </environment>

    <environment names="Staging,Production">
        <link rel="stylesheet" href="~/lib/toastr/toastr.min.css" />
        <link rel="stylesheet" href="~/lib/sweetalert/dist/sweetalert.css" />
        <link rel="stylesheet" href="~/lib/famfamfam-flags/dist/sprite/famfamfam-flags.min.css" />
        <link rel="stylesheet" href="~/lib/font-awesome/css/font-awesome.min.css" />
        @*<link rel="stylesheet" href="~/view-resources/Views/_Bundles/layout-libs.min.css" asp-append-version="true" />*@
    </environment>

    <link rel="stylesheet" href="~/lib/layui/css/layui.css" />
    <link rel="stylesheet" href="~/css/font.css" />
    <link rel="stylesheet" href="~/css/main.css" />

    <!-- View specific styles -->
    @RenderSection("styles", required: false)

    @*<script type="text/javascript">
            //This is used to get the application's root path from javascript. It's useful if you're running application in a virtual directory under IIS.
            var abp = abp || {}; abp.appPath = '@ApplicationPath';
        </script>*@

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    @*<!--[if lt IE 9]>
            <script src="@Url.Content("~/Scripts/others/html5shiv.js")"></script>
            <script src="@Url.Content("~/Scripts/others/respond.min.js")"></script>
        <![endif]-->*@

    @*@Scripts.Render("~/Bundles/vendor/js/top")*@

</head>
<body class="layui-layout-body">
    <!-- 内容主体区域 -->
    @if (AlertManager.Alerts.Any())
    {
        <div id="AbpPageAlerts">
            @foreach (var alertMessage in AlertManager.Alerts)
            {
                <div class="alert alert-@alertMessage.Type.ToString().ToLower() @(alertMessage.Dismissible ? "alert-dismisable" : "")" role="alert">
                    <h4 class="alert-heading">
                        @alertMessage.Title
                        @if (alertMessage.Dismissible)
                        {
                            <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                        }
                    </h4>

                    <p>@alertMessage.Text</p>
                </div>
            }
        </div>
    }
    @RenderBody()

    <!-- Global scripts -->
    <environment names="Development">
        <script src="~/lib/json2/json2.js"></script>
        <script src="~/lib/jquery/dist/jquery.js"></script>
        <script src="~/lib/moment/min/moment-with-locales.js"></script>
        <script src="~/lib/jquery-validation/dist/jquery.validate.js"></script>
        <script src="~/lib/blockUI/jquery.blockUI.js"></script>
        <script src="~/lib/toastr/toastr.js"></script>
        <script src="~/lib/sweetalert/dist/sweetalert-dev.js"></script>
        <script src="~/lib/spin.js/spin.js"></script>
    </environment>

    <environment names="Staging,Production">
        <script src="~/lib/json2/json2.js"></script>
        <script src="~/lib/jquery/dist/jquery.min.js"></script>
        <script src="~/lib/moment/min/moment-with-locales.min.js"></script>
        <script src="~/lib/jquery-validation/dist/jquery.validate.min.js"></script>
        <script src="~/lib/blockUI/jquery.blockUI.js"></script>
        <script src="~/lib/toastr/toastr.min.js"></script>
        <script src="~/lib/sweetalert/dist/sweetalert-dev.min.js"></script>
        <script src="~/lib/spin.js/spin.min.js"></script>
        @*<script src="~/view-resources/Views/_Bundles/layout-libs.min.js" asp-append-version="true"></script>*@
    </environment>

    <script src="~/lib/spin.js/jquery.spin.js"></script>
    <script src="~/lib/abp-web-resources/Abp/Framework/scripts/abp.js"></script>
    <script src="~/lib/abp-web-resources/Abp/Framework/scripts/libs/abp.jquery.js"></script>
    <script src="~/lib/abp-web-resources/Abp/Framework/scripts/libs/abp.toastr.js"></script>
    <script src="~/lib/abp-web-resources/Abp/Framework/scripts/libs/abp.blockUI.js"></script>
    <script src="~/lib/abp-web-resources/Abp/Framework/scripts/libs/abp.sweet-alert.js"></script>
    <script src="~/lib/abp-web-resources/Abp/Framework/scripts/libs/abp.spin.js"></script>
    <script src="~/lib/layui/layui.js"></script>
    <script src="~/js/xadmin.js"></script>

    <script>
        abp.localization.defaultSourceName = '@LocalizationSourceName';
        if (moment) { //Localizing momentjs
            moment.locale('@CultureInfo.CurrentUICulture.Name');
        }
    </script>

    <!-- Dynamic scripts of ABP system (They are created on runtime and can not be bundled) -->
    <script src="~/AbpServiceProxies/GetAll?v=@(Clock.Now.Ticks)" type="text/javascript"></script>
    <script src="~/AbpScripts/GetScripts?v=@(Clock.Now.Ticks)" type="text/javascript"></script>

    <!-- View specific scripts -->
    @RenderSection("scripts", required: false)

</body>
</html>
